Integrand size = 21, antiderivative size = 74 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {(a-b) \log (\cos (e+f x))}{f}-\frac {(a-b) \tan ^2(e+f x)}{2 f}+\frac {(a-b) \tan ^4(e+f x)}{4 f}+\frac {b \tan ^6(e+f x)}{6 f} \]
-(a-b)*ln(cos(f*x+e))/f-1/2*(a-b)*tan(f*x+e)^2/f+1/4*(a-b)*tan(f*x+e)^4/f+ 1/6*b*tan(f*x+e)^6/f
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.85 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {12 (-a+b) \log (\cos (e+f x))-6 (a-b) \tan ^2(e+f x)+3 (a-b) \tan ^4(e+f x)+2 b \tan ^6(e+f x)}{12 f} \]
(12*(-a + b)*Log[Cos[e + f*x]] - 6*(a - b)*Tan[e + f*x]^2 + 3*(a - b)*Tan[ e + f*x]^4 + 2*b*Tan[e + f*x]^6)/(12*f)
Time = 0.39 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.89, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 4114, 3042, 3954, 3042, 3954, 3042, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^5 \left (a+b \tan (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 4114 |
\(\displaystyle (a-b) \int \tan ^5(e+f x)dx+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \int \tan (e+f x)^5dx+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (\frac {\tan ^4(e+f x)}{4 f}-\int \tan ^3(e+f x)dx\right )+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \left (\frac {\tan ^4(e+f x)}{4 f}-\int \tan (e+f x)^3dx\right )+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle (a-b) \left (\int \tan (e+f x)dx+\frac {\tan ^4(e+f x)}{4 f}-\frac {\tan ^2(e+f x)}{2 f}\right )+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (a-b) \left (\int \tan (e+f x)dx+\frac {\tan ^4(e+f x)}{4 f}-\frac {\tan ^2(e+f x)}{2 f}\right )+\frac {b \tan ^6(e+f x)}{6 f}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle (a-b) \left (\frac {\tan ^4(e+f x)}{4 f}-\frac {\tan ^2(e+f x)}{2 f}-\frac {\log (\cos (e+f x))}{f}\right )+\frac {b \tan ^6(e+f x)}{6 f}\) |
(b*Tan[e + f*x]^6)/(6*f) + (a - b)*(-(Log[Cos[e + f*x]]/f) - Tan[e + f*x]^ 2/(2*f) + Tan[e + f*x]^4/(4*f))
3.2.85.3.1 Defintions of rubi rules used
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Simp[(A - C) Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[{a , b, e, f, A, C, m}, x] && NeQ[A*b^2 + a^2*C, 0] && !LeQ[m, -1]
Time = 0.07 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.99
method | result | size |
norman | \(\frac {b \tan \left (f x +e \right )^{6}}{6 f}-\frac {\left (a -b \right ) \tan \left (f x +e \right )^{2}}{2 f}+\frac {\left (a -b \right ) \tan \left (f x +e \right )^{4}}{4 f}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f}\) | \(73\) |
derivativedivides | \(\frac {\frac {b \tan \left (f x +e \right )^{6}}{6}+\frac {a \tan \left (f x +e \right )^{4}}{4}-\frac {b \tan \left (f x +e \right )^{4}}{4}-\frac {a \tan \left (f x +e \right )^{2}}{2}+\frac {b \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(79\) |
default | \(\frac {\frac {b \tan \left (f x +e \right )^{6}}{6}+\frac {a \tan \left (f x +e \right )^{4}}{4}-\frac {b \tan \left (f x +e \right )^{4}}{4}-\frac {a \tan \left (f x +e \right )^{2}}{2}+\frac {b \tan \left (f x +e \right )^{2}}{2}+\frac {\left (a -b \right ) \ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}}{f}\) | \(79\) |
parallelrisch | \(\frac {2 b \tan \left (f x +e \right )^{6}+3 a \tan \left (f x +e \right )^{4}-3 b \tan \left (f x +e \right )^{4}-6 a \tan \left (f x +e \right )^{2}+6 b \tan \left (f x +e \right )^{2}+6 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) a -6 \ln \left (1+\tan \left (f x +e \right )^{2}\right ) b}{12 f}\) | \(90\) |
parts | \(\frac {a \left (\frac {\tan \left (f x +e \right )^{4}}{4}-\frac {\tan \left (f x +e \right )^{2}}{2}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b \left (\frac {\tan \left (f x +e \right )^{6}}{6}-\frac {\tan \left (f x +e \right )^{4}}{4}+\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}\) | \(90\) |
risch | \(i x a -i x b +\frac {2 i a e}{f}-\frac {2 i b e}{f}-\frac {2 \left (6 a \,{\mathrm e}^{10 i \left (f x +e \right )}-9 b \,{\mathrm e}^{10 i \left (f x +e \right )}+18 a \,{\mathrm e}^{8 i \left (f x +e \right )}-18 b \,{\mathrm e}^{8 i \left (f x +e \right )}+24 a \,{\mathrm e}^{6 i \left (f x +e \right )}-34 b \,{\mathrm e}^{6 i \left (f x +e \right )}+18 a \,{\mathrm e}^{4 i \left (f x +e \right )}-18 b \,{\mathrm e}^{4 i \left (f x +e \right )}+6 a \,{\mathrm e}^{2 i \left (f x +e \right )}-9 b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{6}}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) a}{f}+\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b}{f}\) | \(202\) |
1/6*b*tan(f*x+e)^6/f-1/2*(a-b)*tan(f*x+e)^2/f+1/4*(a-b)*tan(f*x+e)^4/f+1/2 *(a-b)/f*ln(1+tan(f*x+e)^2)
Time = 0.26 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.91 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {2 \, b \tan \left (f x + e\right )^{6} + 3 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 6 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} - 6 \, {\left (a - b\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{12 \, f} \]
1/12*(2*b*tan(f*x + e)^6 + 3*(a - b)*tan(f*x + e)^4 - 6*(a - b)*tan(f*x + e)^2 - 6*(a - b)*log(1/(tan(f*x + e)^2 + 1)))/f
Time = 0.17 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.57 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\begin {cases} \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} - \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {b \tan ^{6}{\left (e + f x \right )}}{6 f} - \frac {b \tan ^{4}{\left (e + f x \right )}}{4 f} + \frac {b \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \tan ^{5}{\left (e \right )} & \text {otherwise} \end {cases} \]
Piecewise((a*log(tan(e + f*x)**2 + 1)/(2*f) + a*tan(e + f*x)**4/(4*f) - a* tan(e + f*x)**2/(2*f) - b*log(tan(e + f*x)**2 + 1)/(2*f) + b*tan(e + f*x)* *6/(6*f) - b*tan(e + f*x)**4/(4*f) + b*tan(e + f*x)**2/(2*f), Ne(f, 0)), ( x*(a + b*tan(e)**2)*tan(e)**5, True))
Time = 0.25 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.34 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=-\frac {6 \, {\left (a - b\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {6 \, {\left (2 \, a - 3 \, b\right )} \sin \left (f x + e\right )^{4} - 3 \, {\left (7 \, a - 9 \, b\right )} \sin \left (f x + e\right )^{2} + 9 \, a - 11 \, b}{\sin \left (f x + e\right )^{6} - 3 \, \sin \left (f x + e\right )^{4} + 3 \, \sin \left (f x + e\right )^{2} - 1}}{12 \, f} \]
-1/12*(6*(a - b)*log(sin(f*x + e)^2 - 1) - (6*(2*a - 3*b)*sin(f*x + e)^4 - 3*(7*a - 9*b)*sin(f*x + e)^2 + 9*a - 11*b)/(sin(f*x + e)^6 - 3*sin(f*x + e)^4 + 3*sin(f*x + e)^2 - 1))/f
Leaf count of result is larger than twice the leaf count of optimal. 1450 vs. \(2 (68) = 136\).
Time = 3.79 (sec) , antiderivative size = 1450, normalized size of antiderivative = 19.59 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\text {Too large to display} \]
-1/12*(6*a*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2 *tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^6*tan(e)^6 - 6*b*log(4*(t an(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x )^2 + tan(e)^2 + 1))*tan(f*x)^6*tan(e)^6 + 9*a*tan(f*x)^6*tan(e)^6 - 11*b* tan(f*x)^6*tan(e)^6 - 36*a*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^5*tan(e)^ 5 + 36*b*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*t an(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^5*tan(e)^5 + 6*a*tan(f*x)^6 *tan(e)^4 - 6*b*tan(f*x)^6*tan(e)^4 - 42*a*tan(f*x)^5*tan(e)^5 + 54*b*tan( f*x)^5*tan(e)^5 + 6*a*tan(f*x)^4*tan(e)^6 - 6*b*tan(f*x)^4*tan(e)^6 + 90*a *log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 90*b*log(4*(tan(f*x)^2 *tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan(f*x)^2 + tan (e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 3*a*tan(f*x)^6*tan(e)^2 + 3*b*tan(f*x)^6 *tan(e)^2 - 36*a*tan(f*x)^5*tan(e)^3 + 36*b*tan(f*x)^5*tan(e)^3 + 69*a*tan (f*x)^4*tan(e)^4 - 99*b*tan(f*x)^4*tan(e)^4 - 36*a*tan(f*x)^3*tan(e)^5 + 3 6*b*tan(f*x)^3*tan(e)^5 - 3*a*tan(f*x)^2*tan(e)^6 + 3*b*tan(f*x)^2*tan(e)^ 6 - 120*a*log(4*(tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2* tan(e)^2 + tan(f*x)^2 + tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 + 120*b*log(4*( tan(f*x)^2*tan(e)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(f*x)^2*tan(e)^2 + tan...
Time = 11.68 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.92 \[ \int \tan ^5(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx=\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {a}{4}-\frac {b}{4}\right )-{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {a}{2}-\frac {b}{2}\right )+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^6}{6}+\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \]